Authorizations
A valid API key generated in Topsort's UI.
Body
application/json
List of segments to update.
Response
Successful Response
List of segments.
curl --request PUT \
--url https://api.topsort.com/public/v1/segment-service/segments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"segments": [
{
"config": {
"definition": {
"behaviors": [
{
"action_type": "impressions",
"frequency": {
"operator": "gt",
"value": 1
},
"logic": "and",
"parameters": [
{
"entity_list": [
"<string>"
],
"entity_type": "vendor"
}
],
"time_window": {
"value": 45
}
}
]
},
"type": "dynamic"
},
"description": "<string>",
"id": "<string>",
"name": "<string>"
}
]
}'
{
"segments": [
{
"config": {
"definition": {
"behaviors": [
{
"action_type": "impressions",
"frequency": {
"operator": "gt",
"value": 1
},
"logic": "and",
"parameters": [
{
"entity_list": [
"<string>"
],
"entity_type": "vendor"
}
],
"time_window": {
"value": 45
}
}
]
},
"type": "dynamic"
},
"description": "<string>",
"id": "<string>",
"name": "<string>",
"total": 123
}
]
}
Upsert segments with the provided information.
curl --request PUT \
--url https://api.topsort.com/public/v1/segment-service/segments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"segments": [
{
"config": {
"definition": {
"behaviors": [
{
"action_type": "impressions",
"frequency": {
"operator": "gt",
"value": 1
},
"logic": "and",
"parameters": [
{
"entity_list": [
"<string>"
],
"entity_type": "vendor"
}
],
"time_window": {
"value": 45
}
}
]
},
"type": "dynamic"
},
"description": "<string>",
"id": "<string>",
"name": "<string>"
}
]
}'
{
"segments": [
{
"config": {
"definition": {
"behaviors": [
{
"action_type": "impressions",
"frequency": {
"operator": "gt",
"value": 1
},
"logic": "and",
"parameters": [
{
"entity_list": [
"<string>"
],
"entity_type": "vendor"
}
],
"time_window": {
"value": 45
}
}
]
},
"type": "dynamic"
},
"description": "<string>",
"id": "<string>",
"name": "<string>",
"total": 123
}
]
}
A valid API key generated in Topsort's UI.
List of segments to update.
Show child attributes
Successful Response
List of segments.
Show child attributes
Was this page helpful?